package com.ldp.designpatterns.study.visitor;

import com.ldp.designpatterns.study.visitor.impl.ComputerVisitor;
import com.ldp.designpatterns.study.visitor.impl.Keyboard;
import com.ldp.designpatterns.study.visitor.impl.Mouse;
import com.ldp.designpatterns.study.visitor.service.ComputerPart;

/**
 * @ClassName VisitorTest
 * @Description TODO 观察者模式
 * @Author lindipei
 * @Date 2023/10/17 18:41
 */
public class VisitorTest {
    public static void main(String[] args) {

        ComputerPart mouse = new Mouse();
        mouse.accept(new ComputerVisitor());

        ComputerPart keyboard = new Keyboard();
        keyboard.accept(new ComputerVisitor());
    }
}
